<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 	<head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<title>Page Redirection</title>
    	<script type="text/javascript">
      		window.onload = initRedirection;

      		function initRedirection() {
        		// 绑定事件
        		document.getElementById("hyperLink").onclick = redirection; // 此处无括号
      		}

      		function redirection() {
        		// 页面重定向
        		window.location = "http://www.google.com.hk";
        		// window.location = this; this = "http://www.baidu.com"
        		return false;
      		}
    	</script>
	</head>
  	<body>
    	<a href="http://www.baidu.com" id="hyperLink">Click me</a>
  	</body>
</html>
